#ifndef SHUTDOWN_MENU_H
#define SHUTDOWN_MENU_H

#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QVBoxLayout> 
#include <QIcon>

//菜单
class Shutdown_Menu:public QWidget
{
    Q_OBJECT
public:
    enum IconType {
        NoIcon,
        Information,
        Warning,
        Critical,
        Question
    };
    explicit Shutdown_Menu(QWidget *parent = nullptr);
    ~Shutdown_Menu();
    void setMessage(const QString &message);
    void setIcon(IconType iconType);
    void addButton(const QString &text, QPushButton **buttonPtr = nullptr);
    void exec();
signals:
    void finished();

private slots:
    void buttonClicked();

private:
    void setupUI();

private:
    QLabel *iconLabel;
    QLabel *messageLabel;
    QHBoxLayout *buttonLayout;
};

#endif